package com.supermap.application.controller;

import com.supermap.application.service.MacroDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author sun'f
 * @name 宏观数据控制层
 * @object 管委会月度宏观报表数据
 */
@Controller
@RequestMapping(value = "/macro")
public class MacroDataController {

    @Autowired
    MacroDataService macroDataService;

    /**
     * 获取地区生产总值等数据
     * @return value
     */
    @RequestMapping(value = "/get/gdp")
    @ResponseBody
    public Map getMacroDataByAreaGDP(String year){
        return macroDataService.getAreaGDP(year);
    }


    /**
     * 获取规模以上工业数据
     * @return value
     */
    @RequestMapping(value = "/get/above/industry")
    @ResponseBody
    public Map getAboveIndustry(String year){
        return macroDataService.getAboveIndustry(year);
    }


    /**
     * 获取产业占比数据
     * @return value
     */
    @RequestMapping(value = "/get/proportion")
    @ResponseBody
    public Map getIndustryProportion(String year){
        return macroDataService.getIndustryProportion(year);
    }



    /**
     * 获取房产开发投资数据
     * @return value
     */
    @RequestMapping(value = "/get/realty")
    @ResponseBody
    public Map getRealty(String year){
        return macroDataService.getRealty(year);
    }


    /**
     * 获取纳税总额数据
     * @return value
     */
    @RequestMapping(value = "/get/ratepay")
    @ResponseBody
    public Map getRatepay(String year){
        return macroDataService.getRatepay(year);
    }


    /**
     * 获取房产占比固定投资数据
     * @return value
     */
    @RequestMapping(value = "/get/realty/proportion")
    @ResponseBody
    public Map getRealtyProportion(String year){
        return macroDataService.getRealtyProportion(year);
    }



    /**
     * 获取人口年度数据
     * @return value
     */
    @RequestMapping(value = "/get/population")
    @ResponseBody
    public Map getPopulation(){
        return macroDataService.getPopulation();
    }

}
